package cn.xiaowenjie.daos;

import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

import cn.xiaowenjie.beans.Teacher;


/**
 *  配置类DAO
 *
 */
public interface TeacherDao extends PagingAndSortingRepository<Teacher, Long> {

    List<Teacher> findAllById(Long id);

    @Query("select  e from qw_teacher e order by sortnumber asc")
    List<Teacher> queryAll();
}